<?PHP
class LoginForm extends Form
{
	function __construct()
	{
		parent::__construct();
	}
	function Init()
	{
		if ( !empty($this->params['login']) )
		{
			$success = Security::Login(
				$this->params['login'],
				$this->params['password']
				);

			if ( $success )
			{
				$toUrl = utils::AppLocation() . '/main';
				utils::Redirect($toUrl);
			}
		}
	}
}
?>
